package com.rcd.manager.dao.impl;

import java.util.List;

import com.rcd.dao.IReviewDao;
import com.rcd.exception.MyException;
import com.rcd.manager.dao.IReviewManagerDao;
import com.rcd.util.Page;
import com.rcd.vo.Review;

public class IReviewManagerDaoImpl implements IReviewManagerDao 
{
	private IReviewDao reviewDao;
	
	public void setReviewDao(IReviewDao reviewDao) 
	{
		this.reviewDao = reviewDao;
	}
	
	public void addReview(Review review) throws MyException 
	{
		reviewDao.addReview(review);
	}

	public void updateReview(Review review) throws MyException 
	{
		reviewDao.updateReview(review);
	}
	
	public void delReview(Review review) throws MyException 
	{
		reviewDao.delReview(review);
	}

	public List<Review> findReviewByPid(int pid, Page page) throws MyException 
	{
		return reviewDao.findReviewByPid(pid, page);
	}

	public List<Review> findReviewByUid(int uid, Page page) throws MyException 
	{
		return reviewDao.findReviewByUid(uid, page);
	}

	public int getAllSize(Page page) throws MyException 
	{
		return reviewDao.getAllSize(page);
	}
}